import type { ColumnItem } from "@/model/global";

export const tableCols: Array<ColumnItem> = [
  {
    label: "配置名称",
    prop: "name"
  },
  {
    label: "路由ID",
    prop: "routeId"
  },
  {
    label: "路由名称",
    prop: "routeName"
  },
  {
    label: "描述",
    prop: "description"
  },
  {
    label: "更新时间",
    prop: "updateTime"
  }
];

export const tableOperate = [
  { type: "edit", show: true, text: "配置" },
  { type: "delete", show: true, text: "删除" }
];

export const options = [
  {
    label: "配置名称",
    value: "configName"
  },
  {
    label: "路由ID",
    value: "routerName"
  }
];

export const optionsRouter = [
  {
    label: "灰度服务名称",
    value: "grayName"
  },
  {
    label: "路由名称",
    value: "routerName"
  }
];

export const optionsGray = [
  {
    label: "灰度服务名称",
    value: "grayName"
  },
  {
    label: "路由名称",
    value: "routerName"
  }
];

export interface flowControlConversion {
  id: string;
  name: string;
  description: string;
  routeId: string;
  type: string;
  flowControlConfig: string;
}

export interface IaddGrpcProtocoParams {
  id: string;
  name: string;
  description: string;
  operatorId: number;
  routeId: string;
  rate: string;
  burst: string;
  key: string;
  conn: string;
  default_conn_delay: string;
}
